﻿using WebAPItest.Models.Database;

namespace WebAPItest.Service
{
    public interface IUserService
    {
        /// <summary>
        /// 根据用户名获取用户
        /// </summary>
        /// <returns></returns>
        User GetUserByUserName(string userName);

        /// <summary>
        /// 根据用户名判断用户是否存在
        /// </summary>
        /// <returns></returns>
        bool ExistUserByUserName(string userName);

        /// <summary>
        /// 添加一个新用户
        /// </summary>
        /// <returns></returns>
        int AddNewUser(string username, string email, string nickname, string password);
    }
}
